//
//  SEGTarget_DigitalCommunity.m
//  SEGUhomeSommunityBaseInfo
//
//  Created by 梁昆 on 2018/3/28.
//  Copyright © 2018年 刘山. All rights reserved.
//

#import "SEGSubmitUserAtuhViewController.h"
#import "SEGDigitalComRootViewController.h"
#import "SEGTarget_DigitalCommunity.h"
#import "SEGHouseUserListViewController.h"

@implementation SEGTarget_DigitalCommunity
/**
 * 初始化数字社区，房屋管理
 * @author Helen
 */
-(UIViewController *)segAction_initDigitalComRootViewController:(NSDictionary *)params{
    SEGDigitalComRootViewController *DigitalComVC = [[SEGDigitalComRootViewController alloc] init];
    return DigitalComVC;
}


/**
 * 初始化数字认证
 * @author Helen
 */
-(UIViewController *)segAction_initSubmitUserAtuhViewController:(NSDictionary *)params{
    
    BOOL isSelfAuthApprove = [[[NSUserDefaults standardUserDefaults] objectForKey:@"SELFAPPROVE"] isEqualToString:@"1"];
    
    SEGSubmitUserAtuhViewModel *viewModel = [[SEGSubmitUserAtuhViewModel alloc] init];
    viewModel.isManual = !isSelfAuthApprove;
    
    SEGSubmitUserAtuhViewController *SubmitUserAtuhVC = [[SEGSubmitUserAtuhViewController alloc] initWithViewModel:viewModel];
    return SubmitUserAtuhVC;
}

/**
 * 初始化数字认证,成员管理
 * @author Helen
 */
-(UIViewController *)segAction_initHouseUserListViewController:(NSDictionary *)params{
    SEGHouseUserListViewModel *vm = [[SEGHouseUserListViewModel alloc] init];
    vm.houseId = ValueToString([params valueForKey:@"houseId"]);
    vm.houseName = ValueToString([params valueForKey:@"houseName"]);
    vm.userType = ValueToString([params valueForKey:@"userType"]);
    
    SEGHouseUserListViewController * HouseUserListVC = [[SEGHouseUserListViewController alloc] initWithViewModel:vm];
    return HouseUserListVC;
}

@end
